package com.android.scj.tc.bean;

/**
 *
 * 快速响应应答处理
 * @author LiuYaDong
 */
public class FastResponse {
	// B7 0 1 Status 0：设置成功，非0异常

	private static final String cmdcode = "B7";
	private String Status = "00";
	private CMD_55AA cmd = null;

	private FastResponse() {
	}

	public static FastResponse disassemble(String cmdstr) {
		FastResponse io = new FastResponse();
		io.cmd = CMD_55AA.disassemble(cmdstr);
		if (io.cmd == null)
			return null;
		if (!io.cmd.getCMD().equals(cmdcode))
			return null;
		if (io.cmd.getDATA().length() < 2)
			return null;
		io.Status = io.cmd.getDATA().substring(0, 2);
		return io;

	}

	public String getStatus() {
		return Status;
	}

}
